﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;



namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入两个数字和一个符号");
            string inputA = Console.ReadLine();
            string inputB = Console.ReadLine();
            string inputC = Console.ReadLine();

            double a, b, result;
            double.TryParse(inputA, out a);
            double.TryParse(inputB, out b);

            switch (inputC)
            {
                case "+":
                    result = a + b;
                    break;
                case "-":
                    result = a - b;
                    break;
                case "*":
                    result = a * b;
                    break;
                case "/":
                    if (b == 0)
                    {
                        Console.WriteLine("除数不能为0。");
                        return;
                    }
                    result = a / b;
                    break;
                default:
                    Console.WriteLine("无效的运算符。");
                    return;
            }

            Console.WriteLine(inputA+inputC+inputB+"="+result);
        }
    }
}
